
def fpkjInterface(saleInvoiceConfig, invoice):
    if saleInvoiceConfig.dzfpApiType == 0:
        from .hangtianApi import fpkjInterface
        return fpkjInterface(saleInvoiceConfig, invoice)
    elif saleInvoiceConfig.dzfpApiType == 1:
        raise NameError("废弃的接口")
    elif saleInvoiceConfig.dzfpApiType == 2:
        from .nstApi import fpkjInterface
        return fpkjInterface(saleInvoiceConfig, invoice)
    elif saleInvoiceConfig.dzfpApiType == 3:
        from .leqApi import fpkjInterface
        return fpkjInterface(saleInvoiceConfig, invoice)
    else:
        raise NameError("未知的接口类型")
    
def fpcxInterface(saleInvoiceConfig, invoice):
    if saleInvoiceConfig.dzfpApiType == 0:
        from .hangtianApi import fpcxInterface as fpcxInterface
        return fpcxInterface(saleInvoiceConfig, invoice)
    elif saleInvoiceConfig.dzfpApiType == 1:
        raise NameError("废弃的接口")
    elif saleInvoiceConfig.dzfpApiType == 2:
        from .nstApi import fpcxInterface as fpcxInterface
        return fpcxInterface(saleInvoiceConfig, invoice)
    elif saleInvoiceConfig.dzfpApiType == 3:
        from .leqApi import fpcxInterface as fpcxInterface
        return fpcxInterface(saleInvoiceConfig, invoice)
    else:
        raise NameError("未知的接口类型")
    
def kyfpslInterface(saleInvoiceConfig):
    if saleInvoiceConfig.dzfpApiType == 0:
        from .hangtianApi import kyfpslInterface
        return kyfpslInterface(saleInvoiceConfig)
    elif saleInvoiceConfig.dzfpApiType == 1:
        raise NameError("废弃的接口")
    elif saleInvoiceConfig.dzfpApiType == 2:
        from .nstApi import kyfpslInterface 
        return kyfpslInterface(saleInvoiceConfig)
    else:
        raise NameError("未知的接口类型")
    
def getQrCodeInterface(saleInvoiceConfig,queryType):
    if saleInvoiceConfig.dzfpApiType == 0:    
        from .hangtianApi import getQrCodeInterface
        return getQrCodeInterface(saleInvoiceConfig,queryType)
    elif saleInvoiceConfig.dzfpApiType == 1:
        raise NameError("废弃的接口")
    elif saleInvoiceConfig.dzfpApiType == 2:
        from .nstApi import getQrCodeInterface
        return getQrCodeInterface(saleInvoiceConfig,queryType)
    elif saleInvoiceConfig.dzfpApiType == 3:
        raise NameError("无需调用此接口")
    else:
        raise NameError("未知的接口类型")